package com.zpp.wedding_admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zpp.wedding_admin.entity.Collect;
import com.zpp.wedding_admin.entity.Good;
import com.zpp.wedding_admin.mapper.CollectMapper;
import com.zpp.wedding_admin.mapper.GoodMapper;
import com.zpp.wedding_admin.service.ICollectService;
import com.zpp.wedding_admin.service.IGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodServiceImpl extends ServiceImpl<GoodMapper, Good> implements IGoodService {
    @Autowired
    private GoodMapper goodMapper;

    @Override
    public List<Good> getGood(String id) {
        return goodMapper.getGood(id);
    }

    @Override
    public boolean goodAdd(String id, String userId) {
        return goodMapper.goodAdd(id, userId);
    }

    @Override
    public boolean goodSubtract(String id, String userId) {
        return goodMapper.goodSubtract(id, userId);
    }
}
